<?php
class UserUpdateTownNameAction extends SzAbstractAction
{
    Protected $paramTypes = array(
        SzAbstractAction::TYPE_INT,
        SzAbstractAction::TYPE_STRING
    );

    /**
     * 更新玩家小镇名
     *
     * @param $userId
     * @param $townName
     * @return SzResponse
     */
    public function execute($userId, $townName)
    {
        UserService::get()->updateTownName($userId, $townName);
        return $this->buildResponse(array(
            0 => 0
        ));
    }
}